package org.seamon.management.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author Simon
 */
@Data
public class SmsTaskListVo implements Serializable {
    /**
     *
     */
    private Long id;

    /**
     * 接收员工ID
     */
    private Long userId;

    /**
     * 接收手机号
     */
    private String phone;

    /**
     * 短信内容
     */
    private String content;

    /**
     * 发送时间
     */
    private LocalDateTime sendTime;

    /**
     * 状态 0:待处理 1:处理中 2:成功 3:失败
     */
    private Integer status;

    /**
     * 剩余重试次数
     */
    private Integer retryCount;

    /**
     * 优先级 0:高 1:中 2:低
     */
    private Integer priority;

    /**
     * 最后一次错误信息
     */
    private String lastError;

    /**
     *
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     *
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
}
